home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / Mindy / Mindy 1.2 - portable sources / libraries / print / library.dylan next >
Encoding:
Text File  |  1995-03-15  |  3.3 KB  |  107 lines  |  [TEXT/ttxt]

  1. module: Dylan-User
  2. author: chiles@cs.cmu.edu
  3. synopsis: This file defines the Print library and modules.
  4. copyright: See below.
  5. rcs-header: $Header: library.dylan,v 1.7 94/11/28 15:50:16 wlott Exp $
  6.  
  7. //======================================================================
  8. //
  9. // Copyright (c) 1994  Carnegie Mellon University
  10. // All rights reserved.
  11. // 
  12. // Use and copying of this software and preparation of derivative
  13. // works based on this software are permitted, including commercial
  14. // use, provided that the following conditions are observed:
  15. // 
  16. // 1. This copyright notice must be retained in full on any copies
  17. //    and on appropriate parts of any derivative works.
  18. // 2. Documentation (paper or online) accompanying any system that
  19. //    incorporates this software, or any part of it, must acknowledge
  20. //    the contribution of the Gwydion Project at Carnegie Mellon
  21. //    University.
  22. // 
  23. // This software is made available "as is".  Neither the authors nor
  24. // Carnegie Mellon University make any warranty about the software,
  25. // its performance, or its conformity to any specification.
  26. // 
  27. // Bug reports, questions, comments, and suggestions should be sent by
  28. // E-mail to the Internet address "gwydion-bugs@cs.cmu.edu".
  29. //
  30. //======================================================================
  31. //
  32.  
  33.  
  34. ///
  35. /// These definitions go into the Dylan-User module because this is how we
  36. /// jumpstart a library.
  37. ///
  38.  
  39. define library print
  40.   use dylan;
  41.   use streams;
  42.   export pprint, print;
  43. end library;
  44.  
  45.  
  46. define module pprint
  47.   use Dylan;
  48.   use Extensions;
  49.   use System;
  50.   use Streams;
  51.  
  52.   export
  53.     <pretty-stream>, pprint-logical-block, pprint-newline, pprint-indent,
  54.     pprint-tab, *default-line-length*, *print-miser-width*;
  55. end;
  56.  
  57. /// The Internals Module exports everything that is necessary to make the
  58. /// code in the Print Module run, but only those things that are of an
  59. /// internals nature to a particular Dylan implementation.
  60. ///
  61. /// There is inconsistent usage of the Internals module between the Print
  62. /// and Pprint modules because different hackers wrote each.  We should
  63. /// make Pprint use Internals and import what it needs, same for Print, but
  64. /// we don't have time now to determine exactly what Pprint uses.
  65. ///
  66. define module internals
  67.   use dylan;
  68.   use extensions,
  69.     import: {<boolean>, <fixed-integer>, <extended-integer>, false-or, one-of},
  70.     export: all;
  71.   use introspection,
  72.     import: {class-name, function-name, slot-descriptors, slot-name,
  73.          slot-value, <subclass>, <limited-integer>, <union>,
  74.          singleton-object, subclass-of, limited-integer-class,
  75.          limited-integer-min, limited-integer-max, union-members},
  76.     export: all;
  77. end module;
  78.  
  79. define module print
  80.   use dylan;
  81.   use streams,
  82.     import: {<stream>, write, lock-stream, unlock-stream, <buffer>,
  83.          <buffer-index>, string-output-stream-string,
  84.          <byte-string-output-stream>, <byte-character>, <byte>,
  85.          stream-extension-get-output-buffer,
  86.          stream-extension-release-output-buffer,
  87.          stream-extension-empty-output-buffer,
  88.          stream-extension-force-secondary-buffers,
  89.          stream-extension-synchronize};
  90.   use pprint;
  91.   use internals;
  92.   export
  93.     print,
  94.     print-object,
  95.     print-to-string,
  96.  
  97.     print-length,
  98.     print-level,
  99.     print-depth,
  100.     print-circle?,
  101.     print-pretty?,
  102.     *default-length*,
  103.     *default-level*,
  104.     *default-circle?*,
  105.     *default-pretty?*;
  106. end module;
  107.